<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>部门管理</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <script src="../../assets/js/jquery-2.0.3.min.js"></script>
    <script src="../../assets/js/bootstrap.min.js"></script>
    <script src="../../assets/js/hammer.min.js"></script>
    <script src="../../assets/js/bootstrap.table/bootstrap-table.min.js" type="text/javascript"></script>
    <script src="../../assets/js/bootstrap.table/bootstrap-table-zh-CN.min.js" type="text/javascript"></script>
    <script src="../../assets/ztree/js/jquery.ztree.all.min.js" type="text/javascript"></script>
    <script src="../../assets/js/dialog.js" type="text/javascript"></script>
    <script src="../../assets/js/jquery.cookie.js" type="text/javascript" ></script>
    <script src="../../assets/js/common.js" type="text/javascript"></script>
    <script src="../../assets/js/myUrl.js" type="text/javascript"></script>

    <link href="../../assets/css/bootstrap.min.css" rel="stylesheet" />
    <link href="../../assets/css/bootstrap.table/bootstrap-table.min.css"/>
    <link href="../../assets/css/dialog.css" rel="stylesheet" />
    <link href="../../assets/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" />
    <link href="../../assets/css/common.css" rel="stylesheet" />
</head>
<script type="text/javascript">

    $(document).ready(function () {
        initTable(1);
    })


    function initTableRow(){
        initTable();
    }

    function initTable() {
        var options = {};
        commonInitTable(local_url.dingding_template_list.url, "mytab", options);
    }



</script>
<body style="padding:5px;overflow:auto;">
   <input type="text" class="form-control" id="parentId" name="parentId"   style="display:none"/>
    <div class="panel panel-default" >
        <div class="panel-heading">
            查询条件
        </div>
        <div class="panel-body form-group" style="margin-bottom:0px;">
            <form id="searchForm">
                <label class=" control-label" style="float:left;text-align: left; margin-top:5px">名称：</label>
                <input type="text" class="form-control" style="width: 100px;float:left;" name="queryName" id="queryName"/>
                <div class="col-sm-1" style="float:left;">
                    <button class="btn btn-primary" id="search_btn" onclick="initTableRow();return false;">查询</button>
                </div>
            </form>
        </div>
    </div>
    <table id="mytab" data-toggle="table" class="table table-hover table-bordered" data-single-select="true"
           data-toolbar-align="right" data-toolbar="#toolbar" data-pagination="true"  data-page-size="5" data-striped="true"
           data-page-list="[5,10,20,30]" data-pagination-h-align="right" data-pagination-detail-h-align="left"
           data-pagination-loop="false" data-click-to-select="true" >
        <colgroup>
            <col style="width: 10%">
            <col style="width: 30%">
            <col style="width: 10%">
            <col style="width: 50%">
        </colgroup>
        <thead>
        <tr >
            <th data-align="center" data-valign="middle" data-field="iconUrl" data-formatter="initCode">标题</th>
            <th data-align="center" data-valign="middle" data-field="processCode">process_code</th>
            <th data-align="center" data-valign="middle" data-field="name">名称</th>
            <th data-align="center" data-valign="middle" data-field="url" data-formatter="initUrl">跳转地址</th>
        </tr>
        </thead>
    </table>
</body>
<script>
    function initCode(val, row, index) {
        var html = "";
        html += "<img style='width: 30px;height: 30px;' src=\'"+row.iconUrl+"\' />"
        return html;
    }

    function initUrl(val, row, index) {
        var html = "";
        html += "<a href=\'javascript:void(0)\' onclick=jump(\'"+row.url+"\')>"+row.url+"</a>"
        return html;
    }


    function jump(url) {
        window.location.href = url;
    }
</script>
</html>